<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Travel Dream - Home</title>
	<link href="style.css" rel="stylesheet" type="text/css" />
</h:head>
<h:body>
<div id="maincontainer">
  <div id="menu">
    <div>
    	<ul style="display:block;list-style-type:none;">
    		<li><a href="home.xhtml">HOME</a></li>
    		<li><a href="search package.xhtml">RICERCA PACCHETTO</a></li>
    		<li><a href="search component.xhtml">RICERCA COMPONENTE</a></li>
    	</ul>
    </div>
  </div>
  <div id="right_column">
		<h:form>
		
			<p:panelGrid columns="2">
			
				<f:facet name="header">
					Inserisci Hotel
				</f:facet>
				
				<h:outputLabel for="name" value="Nome Hotel: *" />
				<p:inputText id="name" value="#{hotel.currentHotel.name}" label="name" />
				
				<h:outputLabel for="stars" value="Numero di stelle: *" />
				<p:inputText id="stars" value="#{hotel.currentHotel.stars}" label="stars" />
				
				<h:outputLabel for="street" value="Via: *" />
				<p:inputText id="street" value="#{hotel.currentAddress.street}" label="street" />
				
				<h:outputLabel for="streetNumber" value="Numero civico: *" />
				<p:inputText id="streetNumber" value="#{hotel.currentAddress.streetNumber}" label="streetNumber" />
		
				<h:outputLabel for="city" value="Città: *" />
				<p:inputText id="city" value="#{hotel.currentAddress.city}" label="city" />
				
				<h:outputLabel for="cap" value="Cap: *" />				
				<p:inputText id="cap" value="#{hotel.currentAddress.cap}" label="cap" />
				
				<h:outputLabel for="district" value="Provincia: *" />
				<p:inputText id="district" value="#{hotel.currentAddress.district}" label="district" />
				
				<h:outputLabel for="nation" value="Nazione: *" />
				<p:inputText id="nation" value="#{hotel.currentAddress.nation}" label="nation" />
				
			</p:panelGrid>
				
			<h:commandButton value="Create" action="#{hotel.create()}" />

		</h:form>
		</div>
		</div>
	</h:body>
</html>
